package com.cloudsea.yunhaianalysis.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.FutureOrPresent;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDate;

@Data
@Schema(description = "商家新增事件的请求DTO")
public class EventAddDTO {
    @NotNull(message = "必须指定门店ID")
    private Long storeId;

    @NotNull(message = "事件日期不能为空")
    @FutureOrPresent(message = "只能为今天或未来的日期添加事件")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate eventDate;

    @NotBlank(message = "事件类型不能为空")
    @Schema(example = "PROMOTION")
    private String eventType;

    @NotBlank(message = "事件描述不能为空")
    @Schema(example = "全场饮品8折优惠")
    private String description;
}
